<div class="page" id="roster">
	<h3>Roster</h3>
	<span class="advice">Brothers of <?php echo sprintf($this->view->side[$this->view->guild->side], $this->view->guild->name); ?> from Europe / <?php echo $this->view->guild->realm; ?>, last updated <?php echo $this->partial('helpers/time.php', array('time' => $this->view->updated)); ?>.</span>
	<table>
		<colgroup>
			<col width="32" />
			<col width="33" />
			<col width="144" />
			<col width="80" />
			<col width="106" />
			<col width="98" />
			<col width="95" />
		</colgroup>
		<thead>
			<tr>
				<th align="center">&fnof;</th>
			    <th>&loz;</th>
			    <th>Name</th>
			    <th align="right">Median</th>
			    <th>Spec</th>
			    <th>Class</th>
			    <th>Guild Rank</th>
			</tr>
		</thead>
		<tbody>
		<?php foreach($this->view->characters as $one) { ?>
			<tr>
				<td align="center" class="smaller"><?php echo $one['level']; ?></td>
				<td class="smaller"><?php echo $one['user'] ? $this->partial('helpers/avatar.php', array(
					'size' => 20,
					'user' => $one['user']
				)) : $this->partial('helpers/picture.php', array(
					'size' => 20,
					'user' => array(
						'name' => $one['name'],
						'picture' => $one['picture']
				))); ?></td>
			    <td>
			    	<?php echo $one['user'] ? "<a data-to='ajax' href='profile/view/{$one['user']['link']}'>{$one['user']['name']}</a>" : $one['name']; ?>
			    	<a href="http://eu.battle.net/wow/en/character/<?php echo $this->settings['blizz_realm']; ?>/<?php echo $one['name']; ?>/" target="_blank" rel="nofollow" style="color: #ccc;" title="Battle.net">&bull;</a>
			    </td>
				<td align="right"><a href="javascript:void(0);" data-method="update" data-realm="<?php echo strtolower($this->settings['blizz_realm']); ?>" data-name="<?php echo strtolower($one['name']); ?>" title="Click to update"><?php echo $one['average']; ?></a></td>
			    <td><span class="<?php echo $one['role']; ?>"><?php echo $one['spec']; ?></span></td>
			    <td><span class="<?php echo str_replace(' ', '_', $one['class']); ?>"><?php echo $one['class']; ?></span></td>
			    <td><span class="hidden"><?php echo $one['rank']; ?></span><?php echo isset($this->view->ranks[$one['rank']]) ? trim($this->view->ranks[$one['rank']]) : 'Unknown'; ?></td>
			</tr>
		<?php } ?>
		</tbody>
	</table>
	<div id="pager">
		<span class="pagedisplay"></span>
		<select class="gotoPage"></select>
	</div>
	<div class="delimiter"></div>
	<form class="roster_handlers">
		<div class="left"><button data-handle="exhilarate">Exhilarate</button></div>
		<div class="right">
			<ul class="pagination"></ul>
			<div class="clear"></div>
		</div>
	</form>
	<div class="clear"></div>
</div>